The present invention relates to compounds of formula (I), which are useful for treating disorders caused by or exacerbated by vanilloid receptor activity and pharmaceutical compositions containing compounds of formula (I) which are useful in treating pain, bladder overactivity, and urinary incontinence.